home *** CD-ROM | disk | FTP | other *** search
- Path: mudskipper.cac.psu.edu!user
- From: fcusack@tdx.org (frank.)
- Newsgroups: comp.lang.c
- Subject: Re: *Pointer to Functions(); /* HELP */
- Date: Mon, 22 Jan 1996 11:38:31 -0400
- Organization: Penn State University, Center for Academic Computing
- Message-ID: <fcusack-2201961138310001@mudskipper.cac.psu.edu>
- References: <4dvrq8$c2c@news.unicomp.net>
- NNTP-Posting-Host: mudskipper.cac.psu.edu
-
- In article <4dvrq8$c2c@news.unicomp.net>, jgore@conline.com (Jerry_Gore) wrote:
-
- > How do I pass a pointer to a funtion?
- > The following is found in a program:
- >
- > #define WORD unsigned int
- > void InstallTimer0(WORD period,void far (*func)(void));
- >
- > My function is thus:
- >
- > void far animate(void) /* I added 'far' for no good reason. */
- > { /* It uses that name in InstallTimer0. */
- > /* do what ever */
- > return;
- > }
- >
- > How do I send InstallTimer0 the pointer to my function animate ???
- > I tried:
- >
- > InstallTimer0(120 , (*animate)());
-
- try InstallTimer0(120, &animate);
-
- >
- > But of course, this does not work and neither did anything else!
- > What do I do ???
- ~Frank
- -- I am Pentium of Borg. Division is futile. You will be approximated. --
- -- If you build it, they will come --> http://www.tdx.org/~fcusack/ --
- -- PGP key fingerprint: 01 C0 C0 B9 CC 78 67 0F 3F 64 80 65 8B 0F F9 EA --
-